\iffalse

   This file is part of HPDDM.

   Author(s): Pierre Jolivet <pierre.jolivet@enseeiht.fr>
        Date: 2016-02-14

   Copyright (C) 2016-     Centre National de la Recherche Scientifique

   HPDDM is free software: you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
   by the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   HPDDM is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License
   along with HPDDM.  If not, see <http://www.gnu.org/licenses/>.

\fi
\documentclass{article}
\pagestyle{empty}
\usepackage[landscape,vmargin=1cm,hmargin=1cm]{geometry}
\usepackage{array}
\usepackage{longtable}
\usepackage{url}
\usepackage{amsmath}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{color,colortbl}
\usepackage{multicol}
\usepackage{enumitem}
\usepackage[backend=biber,giveninits=true,useprefix=true,backref=true,style=numeric,maxnames=6,maxbibnames=99,language=auto]{biblatex}
\addbibresource{cheatsheet.bib}
\setlist{nosep,after=\vspace{0.5\baselineskip}}
\newcommand{\fullcitecolor}[1]{{\color{Sepia}\fullcite{#1}}}
\usepackage[utf8]{inputenc}
\newdimen\parspace
\parspace=-0.5cm
\definecolor{LightRed}{rgb}{1,0.88,0.88}
\begin{document}
\begin{center} {\LARGE --- $\quad$ HPDDM $\quad$ ---} \\[5pt] \url{https://github.com/hpddm/hpddm} \end{center}
    All keywords must be prefixed by \texttt{-hpddm\_}. If a value is specified in the column \emph{Default}, this value is used when the corresponding option is not set by the user. When no default value is specified but the corresponding option is set by the user, the option is true (represented internally by 1). If the option is not set, its value is false (represented internally by 0). Options highlighted in \colorbox{LightRed}{red} should be reserved to expert users.
\vspace*{\parspace}
\newdimen\origiwspc
\origiwspc=\fontdimen2\font
\newlength\LTbackup
\setlength{\LTbackup}{\LTleft}
\setlength{\LTleft}{0.15cm}
\begin{center}
    \begin{longtable}{| >{\tt}p{.225\textwidth} | p{.5\textwidth}| p{.145\textwidth}| >{\tt}p{.05\textwidth} | @{}m{0pt}@{}} \hline
        \normalfont{\emph{Keyword}} & \emph{Description} & \emph{Possible values} & \normalfont{\emph{Default}} & \\ \hline
        help & Display available options & Anything & & \\ \hline
        version & Display information about HPDDM & Anything & & \\ \hline
        config\_file & Load options from a file saved on disk & String & & \\ \hline
        tol & Relative decrease in residual norm to reach in order to stop iterative methods & Numeric & $10^{-6}$ & \\ \hline
        max\_it & Maximum number of iterations of iterative methods & Integer & $100$ & \\ \hline
        verbosity & Level of output (higher means more displayed information) & Integer & & \\ \hline
        compute\_residual & Print the residual after convergence & \texttt{l2}, \texttt{l1}, \texttt{linfty} & & \\ \hline
        push\_prefix & Prepend a prefix for all following options (use \verb!-hpddm_pop_prefix! when done) & & & \\ \hline
        \cellcolor{LightRed}reuse\_preconditioner & Do not factorize again the local matrices when solving subsequent systems & Boolean & & \\ \hline
        operator\_spd & Assume the operator is symmetric positive definite & Boolean & & \\ \hline
        orthogonalization & Method used to orthogonalize a vector against an orthogonal basis & \texttt{cgs}, \texttt{mgs} & cgs & \\ \hline
        dump\_matri(ces|x\_[[:digit:]]+) & Save either one or all local matrices to disk & String & & \\ \hline
        dump\_eigenvectors(\_[[:digit:]]+)? & Save either one or all local eigenvectors to disk & String & & \\ \hline
        krylov\_method & Type of iterative method used to solve linear systems & \begin{parbox}{.145\textwidth}{\fontdimen2\font=2.5pt\texttt{gmres}, \texttt{bgmres}, \texttt{cg}, \texttt{bcg}, \texttt{gcrodr}, \texttt{bgcrodr}, \texttt{bfbcg}, \texttt{richardson}, \texttt{none}\fontdimen2\font=\origiwspc}\end{parbox} & gmres & \\ \hline
        enlarge\_krylov\_subspace & Split the initial right-hand side into multiple vectors & Integer & $1$ & \\ \hline
        gmres\_restart & Maximum number of Arnoldi vectors generated per cycle & Integer & $40$ & \\ \hline
        variant & Left, right, or variable preconditioning & \texttt{left},~\texttt{right},~\texttt{flexible} & right & \\ \hline
        qr & Method used to perform distributed QR factorizations & \texttt{cholqr}, \texttt{cgs}, \texttt{mgs} & cholqr & \\ \hline
        deflation\_tol & Tolerance when deflating right-hand sides inside block methods & Numeric & & \\ \hline
        recycle & Number of harmonic Ritz vectors to compute & Integer & & \\ \hline
        recycle\_same\_system & Assume the system is the same as the one for which Ritz vectors have been computed & Boolean & & \\ \hline
        \cellcolor{LightRed}recycle\_strategy & Generalized eigenvalue problem to solve for recycling & \texttt{A}, \texttt{B} & A & \\ \hline
        \cellcolor{LightRed}recycle\_target & Criterion to select harmonic Ritz vectors & \texttt{SM}, \texttt{LM}, \texttt{SR}, \texttt{LR}, \texttt{SI}, \texttt{LI} & SM & \\ \hline
        richardson\_damping\_factor & Damping factor using in Richardson iterations & Numeric & $1.0$ & \\ \hline
        \cellcolor{LightRed}eigensolver\_tol & Tolerance for computing eigenvectors by ARPACK or LAPACK & Numeric & $10^{-6}$ & \\ \hline
        geneo\_nu & Number of local eigenvectors to compute for adaptive methods & Integer & $20$ & \\ \hline
        \cellcolor{LightRed}geneo\_threshold & Threshold for selecting local eigenvectors for adaptive methods & Numeric & & \\ \hline
        \cellcolor{LightRed}geneo\_estimate\_nu & Estimate the number of eigenvalues below a threshold using the inertia of the stencil & Numeric & & \\ \hline
        geneo\_force\_uniformity & Ensure that the number of local eigenvectors is the same for all subdomains & \texttt{min}, \texttt{max} & & \\ \hline
    \end{longtable}
\vspace*{\parspace}
\end{center}
\noindent{
When using multilevel methods, there are additional options, that are all prefixed by \texttt{-hpddm\_level\_}$N$\texttt{\_}, with $N > 1$.}
\vspace*{\parspace}
\begin{center}
    \begin{longtable}{| >{\tt}p{.305\textwidth} | p{.4\textwidth}| p{.12\textwidth}| >{\tt}p{.095\textwidth} | @{}m{0pt}@{}} \hline
        \normalfont{\emph{Keyword}} & \emph{Description} & \emph{Possible values} & \normalfont{\emph{Default}} & \\ \hline
        level\_([2-9]|[1-9]\textbackslash{}d+)\_p & Number of main processes & Integer & $1$ & \\ \hline
        \cellcolor{LightRed}level\_([2-9]|[1-9]\textbackslash{}d+)\_distribution & Distribution of coarse right-hand sides and solution vectors & \texttt{centralized}, \texttt{sol} & cen\-tra\-li\-zed & \\ \hline
        \cellcolor{LightRed}level\_([2-9]|[1-9]\textbackslash{}d+)\_topology & Distribution of the main processes & \texttt{0}, \texttt{1}, \texttt{2} & 0 & \\ \hline
        \cellcolor{LightRed}level\_([2-9]|[1-9]\textbackslash{}d+)\_assembly\_hierarchy & Hierarchy used for the assembly of the coarse operator & Integer & & \\ \hline
        \cellcolor{LightRed}level\_([2-9]|[1-9]\textbackslash{}d+)\_aggregate\_size & Number of main processes per MPI sub-communicators & Integer & \texttt{p} & \\ \hline
        level\_([2-9]|[1-9]\textbackslash{}d+)\_dump\_matrix & Save the coarse operator to disk & String & & \\ \hline
        \cellcolor{LightRed}level\_([2-9]|[1-9]\textbackslash{}d+)\_exclude & Exclude the main processes from the domain decomposition & Boolean & & \\ \hline
    \end{longtable}
\vspace*{\parspace}
\end{center}
\setlength{\LTleft}{\LTbackup}
\noindent{
When using Schwarz methods, there are additional options.}
\vspace*{\parspace}
\begin{center}
    \begin{longtable}{| >{\tt}p{.26\textwidth} | p{.4\textwidth}| p{.20\textwidth} | p{.04\textwidth} |} \hline
        \normalfont{\emph{Keyword}} & \emph{Description} & \emph{Possible values} & \normalfont{\emph{Default}} \\ \hline
        schwarz\_method & Type of Schwarz preconditioner used to solve linear systems & \texttt{ras}, \texttt{oras}, \texttt{soras}, \texttt{asm}, \texttt{osm}, \texttt{none} & \texttt{ras} \\ \hline
        schwarz\_coarse\_correction & Type of coarse correction used in two-level methods & \texttt{deflated}, \texttt{additive}, \texttt{balanced} & \\ \hline
    \end{longtable}
\vspace*{\parspace}
\end{center}
When using substructuring methods, there is an additional option.
\vspace*{\parspace}
\begin{center}
    \begin{longtable}{| >{\tt}p{.15\textwidth} | p{.42\textwidth}| p{.25\textwidth} | p{.085\textwidth} |} \hline
        \normalfont{\emph{Keyword}} & \emph{Description} & \emph{Possible values} & \normalfont{\emph{Default}} \\ \hline
        substructuring\_scaling & Scaling used in the definition of the Schur complement preconditioner & \texttt{multiplicity}, \texttt{stiffness}, \texttt{coefficient} & \texttt{multiplicity} \\ \hline
    \end{longtable}
\vspace*{\parspace}
\end{center}
When using MKL PARDISO as a subdomain or coarse operator solver, there are additional options, cf. \url{https://software.intel.com/en-us/node/470298} (resp. \url{https://software.intel.com/en-us/node/590089}).
\vspace*{\parspace}
\begin{center}
    \begin{longtable}{| >{\tt}p{.3\textwidth} | p{.5\textwidth}| p{.1\textwidth} |} \hline
        \normalfont{\emph{Keyword}} & \emph{Description} & \emph{Possible values} \\ \hline
        \cellcolor{LightRed}mkl\_pardiso\_iparm\_(2|1[013]|2[1457]) & Integer control parameters of MKL PARDISO for the subdomain solvers & Integer \\ \hline
    \end{longtable}
\vspace*{\parspace}
\end{center}
When using MUMPS as a subdomain or coarse operator solver, there are additional options, cf. \url{http://mumps.enseeiht.fr/index.php?page=doc}.
\vspace*{\parspace}
\begin{center}
    \begin{longtable}{| >{\tt}p{.3\textwidth} | p{.5\textwidth}| p{.1\textwidth} |} \hline
        \normalfont{\emph{Keyword}} & \emph{Description} & \emph{Possible values} \\ \hline
        \cellcolor{LightRed}mumps\_icntl\_([678]|1[234]|2[34789]|35) & Integer control parameters & Integer \\ \hline
        \cellcolor{LightRed}mumps\_cntl\_([123457]) & Real control parameters & Numeric \\ \hline
    \end{longtable}
\vspace*{\parspace}
\end{center}
When using \textit{hypre} as a coarse operator solver, there are additional options, cf. \url{http://acts.nersc.gov/hypre/#Documentation}.
\vspace*{\parspace}
\begin{center}
    \begin{longtable}{| >{\tt}p{.26\textwidth} | p{.49\textwidth}| p{.115\textwidth}| p{.05\textwidth} |} \hline
        \normalfont{\emph{Keyword}} & \emph{Description} & \emph{Possible values} & \emph{Default} \\ \hline
        \cellcolor{LightRed}hypre\_solver & Solver used by \textit{hypre} to solve coarse linear systems & \texttt{fgmres}, \texttt{pcg}, \texttt{amg} & \texttt{fgmres} \\ \hline
        \cellcolor{LightRed}hypre\_tol & Relative convergence tolerance & Numeric & $10^{-12}$ \\ \hline
        \cellcolor{LightRed}hypre\_max\_it & Maximum number of iterations & Integer & 500 \\ \hline
        \cellcolor{LightRed}hypre\_gmres\_restart & Maximum number of Arnoldi vectors generated per cycle when using FGMRES & Integer & 100 \\ \hline
        \cellcolor{LightRed}boomeramg\_num\_sweeps & Number of sweeps & Integer & 1 \\ \hline
        \cellcolor{LightRed}boomeramg\_max\_levels & Maximum number of multigrid levels & Integer & 10 \\ \hline
        \cellcolor{LightRed}boomeramg\_coarsen\_type & Parallel coarsening algorithm & Integer & 6 \\ \hline
        \cellcolor{LightRed}boomeramg\_relax\_type & Smoother & Integer & 3 \\ \hline
        \cellcolor{LightRed}boomeramg\_interp\_type & Parallel interpolation operator & Integer & 0 \\ \hline
    \end{longtable}
\vspace*{\parspace}
\end{center}
When using ARPACK as an eigensolver, there is an additional option.
\vspace*{\parspace}
\begin{center}
    \begin{longtable}{| >{\tt}p{.3\textwidth} | p{.5\textwidth}| p{.1\textwidth} |} \hline
        \normalfont{\emph{Keyword}} & \emph{Description} & \emph{Possible values} \\ \hline
        \cellcolor{LightRed}arpack\_ncv & Number of Lanczos basis vectors generated in one iteration & Integer \\ \hline
    \end{longtable}
\vspace*{\parspace}
\end{center}
\begin{multicols}{2}[\section*{References}]
For the keyword \texttt{krylov\_method}:
    \begin{itemize}
        \item value \texttt{gmres}, see \fullcitecolor{saad1986gmres},
        \item value \texttt{bgmres}, see \fullcitecolor{gutknecht2006block},
        \item value \texttt{cg}, see \fullcitecolor{hestenes1952methods},
        \item value \texttt{bcg}, see \fullcitecolor{o1980block},
        \item value \texttt{gcrodr}, see \fullcitecolor{parks2006recycling},
        \item value \texttt{bgcrodr}, see \fullcitecolor{jolivet2016block},
        \item value \texttt{bfbcg}, see \fullcitecolor{ji2017breakdown},
        \item value \texttt{richardson}, see {\color{Sepia}\url{https://en.wikipedia.org/wiki/Modified_Richardson_iteration}}.
    \end{itemize}
For the keyword \texttt{variant}, value \texttt{flexible}, see \fullcitecolor{saad1993flexible}. \\[0.5\baselineskip]
For the keyword \texttt{qr}:
    \begin{itemize}
        \item value \texttt{cholqr}, see \fullcitecolor{stathopoulos2002block},
        \item value \texttt{cgs}, see Algorithm 3 on page 3 of \fullcitecolor{hernandez2005orthogonalization},
        \item value \texttt{mgs}, see Algorithm 4 on page 4.
    \end{itemize}
For the keyword \texttt{deflation\_tol}, see section 12 of \fullcitecolor{gutknecht2006block}. \\[0.5\baselineskip]
For the keywords \texttt{geneo\_nu}, \texttt{geneo\_threshold}, \texttt{p}, and \texttt{topology} see respectively eq.~(8), eq.~(9), section 3.1.1, and figure 5 of \fullcitecolor{jolivet2013scalable}. \\[0.5\baselineskip]
For the keyword \texttt{schwarz\_method}:
    \begin{itemize}
        \item value \texttt{ras}, see \fullcitecolor{cai1999restricted},
        \item values \texttt{oras} and \texttt{soras}, see \fullcitecolor{haferssas2017soras},
        \item value \texttt{asm}, see eq.~(1.30) section 1.4 of \fullcitecolor{dolean2015introduction},
        \item value \texttt{osm}, see \fullcitecolor{gander2006optimized}.
    \end{itemize}
For the keyword \texttt{schwarz\_coarse\_correction}:
    \begin{itemize}
        \item value \texttt{deflated}, see eq.~(13) section 2.3.3 of  \fullcitecolor{tang2009comparison},
        \item value \texttt{additive}, see eq.~(7) section 2.3.1,
        \item value \texttt{balanced}, see the first unnumbered equation of section 2.3.4.
    \end{itemize}
For the keyword \texttt{substructuring\_scaling}:
    \begin{itemize}
        \item value \texttt{multiplicity}, see the first bullet point section 3.2.1 of \fullcitecolor{gosselet2006non},
        \item value \texttt{stiffness}, see the second bullet point,
        \item value \texttt{coefficient}, see the third bullet point.
    \end{itemize}
\end{multicols}
\end{document}
